<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<html>
<base href="<%=basePath%>">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
<link href="css/reg.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/base.css" type="text/css" />
<link rel="stylesheet" href="css/headbott.css" type="text/css" />
<link rel="stylesheet" href="css/index.css" type="text/css" />
<link rel="stylesheet" href="css/ly-list.css" type="text/css" />
<link rel="stylesheet" href="css/reg.css" type="text/css" />
<link rel="stylesheet" href="css/toastr.css" type="text/css" />
<title></title>
</head>
<body>
	<!--上部导航栏开始-->
	<div id="header">
		<div class="heade-con">
			<div class="logo">
				<a href=""><img src="images/LOGO.png" /></a>
			</div>
			<div class="nav posa">
				<ul>
					<li><a href="index.do">首页</a></li>
					<li><a href="project/queryByType.do">公益众筹</a></li>
					<li><a href="problem/queryAll.do">常见问题</a></li>
					<li><a href="ly-list.do">众筹资讯</a></li>
					<li><a class="vcolor" href="new_product.do" style="">发布项目</a></li>
				</ul>
			</div>
			<div class="search">
				<form action="">
					<input type="text" class="search-txt" value="" placeholder="找项目">
					<input type="submit" class="search-but" value="">
				</form>
			</div>
			<div class="index-login">
				<c:choose>
					<c:when test="${login_user!=null }">
						<a href="project/queryByUsId.do">${login_user.usAccount }</a>
						<a href = "user/quit.do">退出</a>
					</c:when>
					<c:otherwise>
						<a href="login.do">登录</a>
						<span style="color: white;">|</span>
						<a href="reg.do">注册</a>
					</c:otherwise>
				</c:choose>

			</div>
		</div>
	</div>
	<!--上不导航栏结束-->
	<!--中间核心-->
	<div class="product">
		<!--头上表格-->
		<div class="product-table">
			<div class="product-left">
				<table class="table table-bordered">
					<tr class="text-center">
						<td class="title-td"><a href="new_info.do">项目信息</a></td>
						<td class="active title-td"><a href="new_product.do">基本信息</a></td>
						<td class="title-td"><a href="new_detail.do">详细描述</a></td>
						<td class="title-td"><a href="new_back.do">回报设置</a></td>
					</tr>
				</table>
			</div>
			<div class="product-right">
				<table class="table table-bordered">
					<tr class="text-center">
						<td class="title-td">预览</td>
					</tr>

				</table>

			</div>
		</div>
		<!--下部foem表单-->
		<div class="product-form">
			<!--上标题-->
			<div class="product-title">
				<div class="my-h4">
					<h4>选择你的身份类型</h4>
				</div>
				<div class="btn-save">
					<button id="add_btn" class="btn btn-default">保存草稿</button>
				</div>

			</div>
			<div class="clear"></div>
			<hr>
			<!--选择机构个人-->
			<div class="choose">
				<table class="table table-bordered">
					<tr class="text-center">
						<td class="choose-td" style="background: #00aced">个人</td>
					</tr>
				</table>
			</div>
			<!--表单-->
			<form>
				<div class="my-form text-center">

					<div class="product-input">
						<input class="text" type="text" readonly
							value="${login_user.usName }" placeholder="请输入中文姓名，2-20个字符">
					</div>
					<div class="product-input">
						<input class="text" type="text" readonly
							value="${login_user.usIdcard }" placeholder="二代身份证，请输入数字或字母">
					</div>
					<div class="product-input">
						<input class="text" type="text" readonly
							value="${login_user.usPhone }" placeholder="请输入手机号码">
					</div>
					<div class="product-input">
						<input class="text" type="text" id="ps_cust_name" value = "${add_project.psCustName }"
							placeholder="客服联系人">
					</div>
					<div class="product-input">
						<input class="text" type="text" id="ps_cust_phone" value = "${add_project.psCustPhone }"
							placeholder="客服咨询电话">
					</div>
				</div>
				客服地址：${add_project.psCustAddress }
				<div id="city_2">
					<div class="product-info-select1">
						<select class="prov" id="ps_cust_address_1"></select>
					</div>
					<div class="product-info-select2">
						<select class="city" id="ps_cust_address_2" disabled="disabled"></select>
						<select class="dist" id="ps_cust_address_3" disabled="disabled"></select>
					</div>
				</div>
				<div class="product-select">
					<div class="select-type">
						<select class="select-cla" id="ps_pst_id">
							<c:forEach items="${all_type }" var="type">
								<option value="${type.pstId }">${type.pstName }</option>
							</c:forEach>
						</select>
					</div>
				</div>
			</form>
		</div>
	</div>
	<!--底部开始-->
	<div id="bottom">
		<div class="bottom-ggt">
			<a href=""><img src="images/bottbom_68.jpg" alt="" /></a>
		</div>
		<div class="zc-yqlink">
			<ul>
				<li><a href="">阿里巴巴集团</a></li>
				<li><a href="">淘宝网</a></li>
				<li><a href="">天猫</a></li>
				<li><a href="">聚划算</a></li>
				<li><a href="">全球速卖通</a></li>
				<li><a href="">阿里巴巴国际交易市场</a></li>
				<li><a href="">1688</a></li>
				<li><a href="">阿里妈妈</a></li>
				<li><a href="">阿里旅行</a></li>
				<li><a href="">阿里云计算</a></li>
				<li><a href="">阿里巴巴集团</a></li>
				<li><a href="">淘宝网</a></li>
				<li><a href="">天猫</a></li>
				<li><a href="">聚划算</a></li>
				<li><a href="">全球速卖通</a></li>
				<li><a href="">阿里巴巴国际交易市场</a></li>
				<li><a href="">1688</a></li>
				<li><a href="">阿里妈妈</a></li>
				<li><a href="">阿里云计算</a></li>
			</ul>
		</div>
		<div class="footer-bd">

			<a href=" ">关于淘宝</a> <a href=" ">合作伙伴</a> <a href=" ">营销中心</a> <a
				href=" ">廉正举报</a> <a href=" ">联系客服</a> <a href=" ">开放平台</a> <a
				href=" ">诚征英才</a> <a href=" ">联系我们</a> <a href=" ">网站地图</a> <a
				href=" ">法律声明</a> <em>© 2003-2015 Taobao.com 版权所有</em><br> <br>
			<span>网络文化经营许可证：<a href=" ">浙网文[2013]0268-027号</a></span> <b>|</b> <span
				data-spm-protocol="i">增值电信业务经营许可证：<a href="">浙B2-20080224-1</a></span>
			<b>|</b> <span>信息网络传播视听节目许可证：1109364号</span> <b>|</b> <span>举报电话:0571-81683755</span>
		</div>
	</div>
	<script type="text/javascript" src="js/jquery-1.42.min.js"></script>
	<script type="text/javascript" src="js/toastr.js"></script>
	<script type="text/javascript" src="js/jquery.cityselect.js"></script>
	<script type="text/javascript">
		$(function() {
			$("#city_2").citySelect({
				prov : "---请选择---",
				nodata : "---请选择---"
			});
		});

		$("#add_btn").click(
				function() {

					var ps_cust_name = $("#ps_cust_name").val();
					var ps_pst_id = $("#ps_pst_id").val();
					var ps_cust_phone = $("#ps_cust_phone").val();
					var ps_cust_address = $("#ps_cust_address_1").val()+"  "
							+ $("#ps_cust_address_2").val();
					if($("#ps_cust_address_3").val()!= null){
						ps_cust_address = ps_cust_address+"  "+$("#ps_cust_address_3").val();
					}
					var ps_support = $("#ps_support").val();
					var ps_pst_id = $("#ps_pst_id").val();
					$.ajax({
						url : "project/addPro2.do",
						data : {
							"psCustName" : ps_cust_name,
							"psCustPhone" : ps_cust_phone,
							"psCustAddress" : ps_cust_address,
							"psSupport" : ps_support,
							"psPstId":ps_pst_id
						},
						type : "post",
						success : function(data) {
							if(data == -1){
								window.location.href = "new_info.do";
							}else{
								if (data == 1) {
									toastr.info("保存成功");
									setTimeout(
											"window.location.href = 'new_detail.do'",
											500)
								} else {
									toastr.info("保存失败");
								}
							}
						},
						error : function() {
							toastr.error("服务端错误");
						}
					})
				})
	</script>
</body>
</html>